package models;
 
import java.util.*;
import javax.persistence.*;
 
import play.db.jpa.*;
 
@Entity
public class Object extends Model {
    public Date createdOn;
	public String name;
    public String description;
    public Date deletedOn;
    public String owner;
    public String city;
    public String street;
    public String streetNumber;
    public String zipcode;

    @ManyToOne
    public Country country;

    @ManyToOne
    public User deleatedBy;

    @ManyToOne
    public User createdBy;

    @ManyToMany
    public List<User> managers;

    @OneToMany (mappedBy = "object")
    public List<ObjectLevel> levels;

    @ManyToMany
    public List<Category> categories;
    
    
    public Object(String name, String description) {
		this.name = name;
        this.description = description;
    }

    @Override
    public String toString() {
        return this.name;    //To change body of overridden methods use File | Settings | File Templates.
    }
}